using UnityEngine;
using System.Collections;

public class Item {
	
	private static int uniqueID = -1;
	public static int fetchUniqueID() {
		uniqueID++;
		return uniqueID;
	}
	
	public string name = "[NamePlaceholder]";
	public string description = "[DescriptionPlaceholder]";
	public int uid = -1;
	public int index = 0;
	public Texture icon;
	public AudioSource audioSource;
	public AudioClip audio;
	
	// Use this for initialization
	public Item () {
		bool hasSpot = false;
		
		uid = Item.fetchUniqueID();
		
		if (Game.inventory.items != null) {
			for (int i = 0; i < Game.inventory.items.Length; i++) {
				if (!hasSpot) {
					if (Game.inventory.items[i] == null) {
						index = i;
						hasSpot = true;
					}
				}
			}
		}
	}
	
	public virtual void onLeftClick() {
	}
}
